<template>
  <div id="home">
    <img src="../assets/0b3f-iepyyhh5882243.jpg" alt="">
    <ul>
      <li v-for="item in users">
        {{item.name}}--{{item.age}}
      </li>
    </ul>
  </div>
</template>

<script>
  import {getUser} from "../api/user";

  export default {

    data() {
      return {
        users: []
      }
    },
    name: "Home",
    async created() {
      let res  = await getUser();
      this.users = res.user;
    }
  }
</script>

<style scoped>

</style>
